<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">

<script type="text/javascript" src="../js/checkProductInfo.js">
</script>

<head>
    <meta charset="UTF-8">
    <title>MyPetstore</title>
</head>
<body>
<div th:replace="common/admintop"></div>

<div id="Content">

    <div id="BackLink">
        <a th:href="@{/admin/viewProducts}">Back</a>
    </div>

    <p align="center"><font color="red" th:text="${failMsg}">failMsg</font></p>

    <div id="Catalog">
        <form action="/admin/addProduct" method="post" enctype="multipart/form-data">
            <h3>Product Information</h3>

            <table class="rwd-table">
                <tr>
                    <td>Product Id:</td>
                    <td><input type="text" name="productId"/></td>
                </tr>
                <tr>
                    <td>Category:</td>
                    <td>
                        <select name="categoryId">
                            <option value="BIRDS">
                                BIRDS
                            </option>
                            <option value="DOGS">
                                DOGS
                            </option>
                            <option value="CATS">
                                CATS
                            </option>
                            <option value="FISH">
                                FISH
                            </option>
                            <option value="REPTILES">
                                REPTILES
                            </option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>Name:</td>
                    <td><input type="text" name="name"/></td>
                </tr>
                <tr>
                    <td>Image:</td>
                    <td>
                        <input type="file" name="file"/>
                    </td>
                </tr>
                <tr>
                    <td>Description:</td>
                    <td><input type="text" name="word"/></td>
                </tr>
            </table>

            <p align="center"><font color="red" name="errormsg"></font></p>

            <input onclick=" return checkAdd()" type="submit" name="addProduct" value="Confirm"/>


        </form>
    </div>
</div>
<div th:replace="common/bottom"></div>
</body>
</html>